/**
 * 
 */
package com.neal.domain.shopping;

import java.io.Serializable;

/**
 * @author Neal
 * @version 1.0
 * @description
 */
public class CartItem implements Serializable {

	private static final long serialVersionUID = 2691768065169199799L;

	private Product product;

	private int quantity;

	public CartItem(Product product, int quantity) {
		super();
		this.product = product;
		this.quantity = quantity;
	}
	
	public double getTotalPrice() {
		return this.quantity * this.product.getAmount();
	}
	
	public void increaseQuant() {
		this.quantity ++;
	}
	
	public Product getProduct() {
		return product;
	}

	
	public void setProduct(Product product) {
		this.product = product;
	}

	
	public int getQuantity() {
		return quantity;
	}

	
	public void setQuantity(int quantity) {
		this.quantity = quantity;
	}

}
